-
Notifications
You must be signed in to change notification settings - Fork 109
tokens - added feature flag OAUTH_CMS_TOKEN_NAME in WMAgent.secrets #12428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Additional logic needs to be implemented.
we could add four configuration parameters in config.py with lists of regexs. It's not clear to me if we want to check this at job submission level or at WQE level. see discussion at https://its.cern.ch/jira/projects/CMSSI/issues/CMSSI-124?filter=allissues |
|
As discussed with Kenyi and Andrea, we agreed on the following steps (on top of Dario's comment above):
|
|
There are two cases of (un)available token support to distinguish:
|
related to #12228
Status
not tested
Description
It is straightforward to enable the use of tokens in remote jobs, it is enough to add the following classad to the jobs jdl
However, It is not trivial to decide when it is safe to enable this feature. For example, if the file
/var/lib/condor/oauth_credentials/cmst1/cms_wmagent.usedoes not exist in the wmagent VM, than condor_submit fails.We could use the condor cli or python bindings to check if a token is present [1], but these interfaces are likely to change in the future, see [2]. We need a solution that is tested, stable and reliable for years to come.After a quick chat with Alan, I propose to use a feature flag to enable this. This would allow not to rely on any additional condor interface, we would just trust that every WMAgent is equipped with a proper token. This simplicity comes at the expense of manual intervention from operators in order to disable tokens in case of infrastructure malfunctions.I decided not to use a true/false feature flag because I want the application to be ready in case of another token name change.(edit) I had another chat with Alan. We agreed that:
/usr/sbin/condor_store_credin thewmagent-docker-run.shscript. if the token is not valid, then the wmagent is not initializedhow to operate the agent after this PR is merged
enable
enable the feature adding the following to WMagent.secrets, then init the agent
If you can not initialize an agent, then change
/data/dockerMount/srv/wmagent/current/config/config.pyas follows and restart the agentdisable
We do not support starting an agent without a valid token
Change
/data/dockerMount/srv/wmagent/current/config/config.pyas follows and restart the agentIs it backward compatible (if not, which system it affects?)
yes. if the WMAgent.secrets file is not touched, then the value from
etc/WMAgentConfig.pyis used, which disables the use of tokensRelated PRs
PR for CMSKubernetes: dmwm/CMSKubernetes#1642
External dependencies / deployment changes
nope :)
[1] condor cli
condor python bindings v24.0 with AP running 24.0
[2] https://its.cern.ch/jira/browse/CMSSI-124?focusedId=7068943&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-7068943
After extensive tests, I noticed that this area of condor is still under development and features are still added and polished. For example the new python bindings
htcondor2introduce new functions wrthtcondor. the bindings for 24.0 do not match the documentations. the bindingshtcondor2for 24.X are not compatible with 24.0, etc etc.[3]
used wf
dmapelli_SC_ProdPsi_test_tokens_v2_250822_181225_919on test11 and vocms0262wf completed ok
[4]
edit config.py
restart JobSubmitter, job content seem ok